﻿<%@ Page Title="Change Password" Language="C#" MasterPageFile="~/App_MasterPages/Aquarius.Master"
    AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs" Inherits="PepsiCo.UI.ChangePassword" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="CssContent">
    <style type="text/css">
        fieldset
        {
            padding: 10px 10px 10px 20px;
        }
        legend
        {
            margin: 0px 4px;
            padding:0px 4px;
            font-size:18px;
            font-weight:bold;
            width:auto;
        }
    </style>
</asp:Content>
<asp:Content ID="script_content" runat="server" ContentPlaceHolderID="ScriptContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Change Password
    </h2>
    <p>
        Use the form below to change your password.
    </p>
    <p>
        New passwords are required to be a minimum of 6
        characters in length.
    </p>
    <span class="failureNotification">
        <asp:Literal ID="FailureText" runat="server"></asp:Literal>
    </span>
  <%--  <asp:ValidationSummary ID="ChangeUserPasswordValidationSummary" runat="server" CssClass="failureNotification"
        ValidationGroup="ChangeUserPasswordValidationGroup" />--%>
    <div class="accountInfo">
        <fieldset class="changePassword" style="border: 1px solid">
            <legend>Account Information</legend>
            <p>
                <asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword">Old Password:</asp:Label>
                <asp:TextBox ID="CurrentPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
                    ForeColor="Red" ErrorMessage="Password is required." ToolTip="Old Password is required." Display="Dynamic"
                    ValidationGroup="ChangeUserPasswordValidationGroup" />
            </p>
            <p>
                <asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword">New Password:</asp:Label>
                <asp:TextBox ID="NewPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword"
                    ForeColor="Red" ErrorMessage="New Password is required." ToolTip="New Password is required." Display="Dynamic"
                    ValidationGroup="ChangeUserPasswordValidationGroup" />
                <asp:RegularExpressionValidator ID="RangePasswordRequired" runat="server" ControlToValidate="NewPassword"
                    ForeColor="Red" ErrorMessage="New passwords are required to be a minimum of 6 characters in length"
                    ValidationGroup="ChangeUserPasswordValidationGroup" Display="Dynamic"
                    ValidationExpression=".{6}.*" />
                    
            </p>
            <p>
                <asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword">Confirm New Password:</asp:Label>
                <asp:TextBox ID="ConfirmNewPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
                    ForeColor="Red" Display="Dynamic" ErrorMessage="Confirm New Password is required."
                    ToolTip="Confirm New Password is required." ValidationGroup="ChangeUserPasswordValidationGroup" />
                <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword"
                    ControlToValidate="ConfirmNewPassword" ForeColor="Red" Display="Dynamic"
                    ErrorMessage="The Confirm New Password must match the New Password entry." ValidationGroup="ChangeUserPasswordValidationGroup" />
            </p>
            <p class="submitButton">
                <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="Cancel" CssClass="btn" OnClick="CancelPushButton_Click" />
                <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword"
                    Text="Change Password" CssClass="btn" ValidationGroup="ChangeUserPasswordValidationGroup"
                    OnClick="ChangePasswordPushButton_Click" />
            </p>
        </fieldset>
    </div>
</asp:Content>
